USE [Owlpal]
GO
/****** Object:  User [superowlpal]    Script Date: 06/19/2009 11:42:33 ******/
CREATE USER [superowlpal] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[Blogs]
GO
/****** Object:  Schema [Articles]    Script Date: 06/19/2009 11:42:31 ******/
CREATE SCHEMA [Articles] AUTHORIZATION [superowlpal]
GO
/****** Object:  Schema [Blogs]    Script Date: 06/19/2009 11:42:31 ******/
CREATE SCHEMA [Blogs] AUTHORIZATION [superowlpal]
GO
/****** Object:  Schema [Forums]    Script Date: 06/19/2009 11:42:31 ******/
CREATE SCHEMA [Forums] AUTHORIZATION [superowlpal]
GO
/****** Object:  Schema [Newsletters]    Script Date: 06/19/2009 11:42:31 ******/
CREATE SCHEMA [Newsletters] AUTHORIZATION [superowlpal]
GO
/****** Object:  Schema [Polls]    Script Date: 06/19/2009 11:42:31 ******/
CREATE SCHEMA [Polls] AUTHORIZATION [superowlpal]
GO
/****** Object:  Table [Newsletters].[Newsletter]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Newsletters].[Newsletter](
	[ID] [uniqueidentifier] NOT NULL,
	[Subject] [nvarchar](1024) NOT NULL,
	[Body] [nvarchar](max) NOT NULL,
	[DateCreated] [datetime2](7) NOT NULL,
	[DateUpdated] [datetime2](7) NOT NULL,
	[DateSent] [datetime2](7) NOT NULL,
	[Status] [nvarchar](50) NOT NULL,
	[CreatedBy] [uniqueidentifier] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Newsletter] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Forums].[Forum]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Forums].[Forum](
	[ID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Forum] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Tag]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[Tag](
	[ID] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](256) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Tag] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Polls].[Question]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Polls].[Question](
	[ID] [uniqueidentifier] NOT NULL,
	[Text] [nvarchar](255) NOT NULL,
	[IsDefault] [bit] NOT NULL,
	[IsArchived] [bit] NOT NULL,
	[CreatedBy] [uniqueidentifier] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
	[DateUpdated] [datetime2](7) NOT NULL,
	[DateCreated] [datetime2](7) NOT NULL,
 CONSTRAINT [PK_Question] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Category]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[Category](
	[ID] [uniqueidentifier] NOT NULL,
	[Classification] [nvarchar](15) NOT NULL,
	[CategoryID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](255) NOT NULL,
	[Description] [nvarchar](2048) NOT NULL,
	[IsVisible] [bit] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[LastUpdateDate] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NULL,
	[CreatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_BlogCategory] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Articles].[Category]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Articles].[Category](
	[ID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Category] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Blog]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [Blogs].[Blog](
	[ID] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](256) NOT NULL,
	[Title] [nvarchar](512) NOT NULL,
	[Description] [nvarchar](1024) NOT NULL,
	[IsPrivate] [bit] NOT NULL,
	[Theme] [char](32) NOT NULL,
	[EnableFeeder] [bit] NOT NULL,
	[EnablePublishing] [bit] NOT NULL,
	[EnableComment] [bit] NOT NULL,
	[EnableTrackback] [bit] NOT NULL,
	[EnablePing] [bit] NOT NULL,
	[EnableEmailReferral] [bit] NOT NULL,
	[EnableRichEditor] [bit] NOT NULL,
	[EnbleAnonymousCommentModeration] [bit] NOT NULL,
	[EnableNewCommentNotification] [bit] NOT NULL,
	[AllowHtmlInComment] [bit] NOT NULL,
	[AllowAnonymousComment] [bit] NOT NULL,
	[EmailAddressForCommentNotification] [nvarchar](255) NOT NULL,
	[EmailAddressForEntryCreation] [nvarchar](255) NOT NULL,
	[EntryDisplay] [smallint] NOT NULL,
	[EntryDisplayType] [char](20) NOT NULL,
	[EntryDisplaySortOrder] [char](20) NOT NULL,
	[DateLocale] [char](20) NOT NULL,
	[DefaultEntryStatus] [char](20) NOT NULL,
	[LinkQuantity] [smallint] NOT NULL,
	[FeedQuantity] [smallint] NOT NULL,
	[CopyrightPeriod] [nvarchar](32) NOT NULL,
	[CopyrightOwner] [nvarchar](256) NOT NULL,
	[Timezone] [char](20) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NULL,
	[CreatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Blog] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Entry or Day' , @level0type=N'SCHEMA',@level0name=N'Blogs', @level1type=N'TABLE',@level1name=N'Blog', @level2type=N'COLUMN',@level2name=N'EntryDisplayType'
GO
/****** Object:  Table [Blogs].[BannedIPAddress]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[BannedIPAddress](
	[ID] [uniqueidentifier] NOT NULL,
	[IPAddress] [nvarchar](32) NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_BannedIPAddress] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Articles].[Article]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Articles].[Article](
	[ID] [uniqueidentifier] NOT NULL,
	[CategoryID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Article] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Entry]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[Entry](
	[ID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[UserID] [uniqueidentifier] NOT NULL,
	[LinkName] [nvarchar](256) NOT NULL,
	[Title] [nvarchar](256) NOT NULL,
	[Excerpt] [nvarchar](4000) NOT NULL,
	[Text] [nvarchar](max) NOT NULL,
	[EnableCommentNotification] [bit] NOT NULL,
	[EnableExcerptSyndication] [bit] NOT NULL,
	[AllowComment] [bit] NOT NULL,
	[AllowPing] [bit] NOT NULL,
	[AllowTrackback] [bit] NOT NULL,
	[FlightStartDate] [datetime] NOT NULL,
	[FlightEndDate] [datetime] NOT NULL,
	[SyndicationDate] [datetime] NOT NULL,
	[Status] [nvarchar](20) NOT NULL,
	[CommentStatus] [nvarchar](20) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_myegp_blogs_Entry] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Sets the excerpt of the Entry for syndication.' , @level0type=N'SCHEMA',@level0name=N'Blogs', @level1type=N'TABLE',@level1name=N'Entry', @level2type=N'COLUMN',@level2name=N'EnableExcerptSyndication'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Indicates the status of the comment: 1) Requires approval; 2) Shown immediately to the Blog.' , @level0type=N'SCHEMA',@level0name=N'Blogs', @level1type=N'TABLE',@level1name=N'Entry', @level2type=N'COLUMN',@level2name=N'CommentStatus'
GO
/****** Object:  Table [Forums].[Post]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Forums].[Post](
	[ID] [uniqueidentifier] NOT NULL,
	[ForumID] [uniqueidentifier] NOT NULL,
	[ParentID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Post] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Polls].[Option]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Polls].[Option](
	[ID] [uniqueidentifier] NOT NULL,
	[QuestionID] [uniqueidentifier] NOT NULL,
	[Text] [nvarchar](255) NOT NULL,
 CONSTRAINT [PK_PollOption] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[UserBlog]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[UserBlog](
	[ID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[UserID] [uniqueidentifier] NOT NULL,
	[IsPrimary] [bit] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[LastUpdateDate] [datetime] NOT NULL,
	[CreatedBy] [uniqueidentifier] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_UserBlog] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Polls].[Vote]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Polls].[Vote](
	[ID] [uniqueidentifier] NOT NULL,
	[QuestionID] [uniqueidentifier] NOT NULL,
	[OptionID] [uniqueidentifier] NOT NULL,
	[IPAddress] [nvarchar](255) NOT NULL,
	[HostName] [nvarchar](255) NOT NULL,
	[DateVoted] [datetime2](7) NOT NULL,
 CONSTRAINT [PK_Vote] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Trackback]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[Trackback](
	[ID] [uniqueidentifier] NOT NULL,
	[EntryID] [uniqueidentifier] NOT NULL,
	[CategoryID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](256) NOT NULL,
	[Description] [nvarchar](1024) NOT NULL,
	[Url] [nvarchar](256) NOT NULL,
	[Rss] [nvarchar](256) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Trackback] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Pingback]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[Pingback](
	[ID] [uniqueidentifier] NOT NULL,
	[EntryID] [uniqueidentifier] NOT NULL,
	[CategoryID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[Url] [nvarchar](256) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Pingback] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[EntryTag]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[EntryTag](
	[ID] [uniqueidentifier] NOT NULL,
	[EntryID] [uniqueidentifier] NOT NULL,
	[TagID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_EntryTag] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[Comment]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[Comment](
	[ID] [uniqueidentifier] NOT NULL,
	[CommentID] [uniqueidentifier] NOT NULL,
	[EntryID] [uniqueidentifier] NOT NULL,
	[BlogID] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](256) NOT NULL,
	[Feedback] [nvarchar](max) NOT NULL,
	[IsVisible] [bit] NOT NULL,
	[IsApproved] [bit] NOT NULL,
	[CommenterName] [nvarchar](256) NOT NULL,
	[CommenterEmail] [nvarchar](256) NOT NULL,
	[CommenterUrl] [nvarchar](256) NOT NULL,
	[CommenterHostName] [nvarchar](124) NOT NULL,
	[CommenterIPAddress] [nvarchar](32) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Articles].[Comment]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Articles].[Comment](
	[ID] [uniqueidentifier] NOT NULL,
	[ArticleID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_Comment_1] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [Blogs].[CategoryEntry]    Script Date: 06/19/2009 11:42:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Blogs].[CategoryEntry](
	[ID] [uniqueidentifier] NOT NULL,
	[CategoryID] [uniqueidentifier] NOT NULL,
	[EntryID] [uniqueidentifier] NOT NULL,
	[IsPrimary] [bit] NOT NULL,
	[IsVisible] [bit] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[DateCreated] [datetime] NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[UpdatedBy] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_CategoryEntry] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Default [DF_BannedIPAddress_IPAddress]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[BannedIPAddress] ADD  CONSTRAINT [DF_BannedIPAddress_IPAddress]  DEFAULT ('') FOR [IPAddress]
GO
/****** Object:  Default [DF_BannedIPAddress_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[BannedIPAddress] ADD  CONSTRAINT [DF_BannedIPAddress_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_BannedIPAddress_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[BannedIPAddress] ADD  CONSTRAINT [DF_BannedIPAddress_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_BannedIPAddress_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[BannedIPAddress] ADD  CONSTRAINT [DF_BannedIPAddress_DateUpdated]  DEFAULT ('1-1-1753') FOR [DateUpdated]
GO
/****** Object:  Default [DF_Blog_Name]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_Blog_Title]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_Title]  DEFAULT ('') FOR [Title]
GO
/****** Object:  Default [DF_Blog_Description]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_Description]  DEFAULT ('') FOR [Description]
GO
/****** Object:  Default [DF_Blog_IsPrivate]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_IsPrivate]  DEFAULT ((0)) FOR [IsPrivate]
GO
/****** Object:  Default [DF_Blog_Theme]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_Theme]  DEFAULT ('Bert') FOR [Theme]
GO
/****** Object:  Default [DF_Blog_EnableFeeder]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnableFeeder]  DEFAULT ((0)) FOR [EnableFeeder]
GO
/****** Object:  Default [DF_Blog_EnbablePublishing]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnbablePublishing]  DEFAULT ((0)) FOR [EnablePublishing]
GO
/****** Object:  Default [DF_Blog_EnableComment]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnableComment]  DEFAULT ((0)) FOR [EnableComment]
GO
/****** Object:  Default [DF_Blog_EnableTrackback]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnableTrackback]  DEFAULT ((0)) FOR [EnableTrackback]
GO
/****** Object:  Default [DF_Blog_EnablePing]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnablePing]  DEFAULT ((0)) FOR [EnablePing]
GO
/****** Object:  Default [DF_Blog_EnableEmailReferral]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnableEmailReferral]  DEFAULT ((0)) FOR [EnableEmailReferral]
GO
/****** Object:  Default [DF_Blog_EnableRichEditor]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnableRichEditor]  DEFAULT ((0)) FOR [EnableRichEditor]
GO
/****** Object:  Default [DF_Blog_EnbleAnonymousCommentModeration]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnbleAnonymousCommentModeration]  DEFAULT ((0)) FOR [EnbleAnonymousCommentModeration]
GO
/****** Object:  Default [DF_Blog_EnableNewCommentNotification]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EnableNewCommentNotification]  DEFAULT ((0)) FOR [EnableNewCommentNotification]
GO
/****** Object:  Default [DF_Blog_AllowHtmlInComment]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_AllowHtmlInComment]  DEFAULT ((0)) FOR [AllowHtmlInComment]
GO
/****** Object:  Default [DF_Blog_AllowAnonymousComment]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_AllowAnonymousComment]  DEFAULT ((0)) FOR [AllowAnonymousComment]
GO
/****** Object:  Default [DF_Blog_EmailAddressForCommentNotification]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EmailAddressForCommentNotification]  DEFAULT ('') FOR [EmailAddressForCommentNotification]
GO
/****** Object:  Default [DF_Blog_EmailAddressForBlogCreation]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EmailAddressForBlogCreation]  DEFAULT ('') FOR [EmailAddressForEntryCreation]
GO
/****** Object:  Default [DF_Blog_EntryDisplay]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EntryDisplay]  DEFAULT ((10)) FOR [EntryDisplay]
GO
/****** Object:  Default [DF_Blog_DisplayEntryType]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_DisplayEntryType]  DEFAULT ('Entry') FOR [EntryDisplayType]
GO
/****** Object:  Default [DF_Blog_EntryDisplaySortOrder]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_EntryDisplaySortOrder]  DEFAULT ('Descending') FOR [EntryDisplaySortOrder]
GO
/****** Object:  Default [DF_Blog_DateLocale]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_DateLocale]  DEFAULT ('English') FOR [DateLocale]
GO
/****** Object:  Default [DF_Blog_DefaultEntryStatus]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_DefaultEntryStatus]  DEFAULT ('Published') FOR [DefaultEntryStatus]
GO
/****** Object:  Default [DF_Blog_LinkQuantity]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_LinkQuantity]  DEFAULT ((10)) FOR [LinkQuantity]
GO
/****** Object:  Default [DF_Blog_FeedQuantity]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_FeedQuantity]  DEFAULT ((10)) FOR [FeedQuantity]
GO
/****** Object:  Default [DF_Blog_CopyrightPeriod]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_CopyrightPeriod]  DEFAULT ('') FOR [CopyrightPeriod]
GO
/****** Object:  Default [DF_Blog_CopyrightOwner]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_CopyrightOwner]  DEFAULT ('') FOR [CopyrightOwner]
GO
/****** Object:  Default [DF_Blog_Timezone]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_Timezone]  DEFAULT ('') FOR [Timezone]
GO
/****** Object:  Default [DF_Blog_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Blog_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_Blog_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Blog] ADD  CONSTRAINT [DF_Blog_DateUpdated]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [DateUpdated]
GO
/****** Object:  Default [DF_Category_Name]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Category] ADD  CONSTRAINT [DF_Category_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_Category_Description]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Category] ADD  CONSTRAINT [DF_Category_Description]  DEFAULT ('') FOR [Description]
GO
/****** Object:  Default [DF_myegp_Blogs_Category_IsVisible]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Category] ADD  CONSTRAINT [DF_myegp_Blogs_Category_IsVisible]  DEFAULT ((0)) FOR [IsVisible]
GO
/****** Object:  Default [DF_Category_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Category] ADD  CONSTRAINT [DF_Category_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Category_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Category] ADD  CONSTRAINT [DF_Category_DateCreated]  DEFAULT (getdate()) FOR [CreationDate]
GO
/****** Object:  Default [DF_Category_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Category] ADD  CONSTRAINT [DF_Category_DateUpdated]  DEFAULT ('1-1-1753') FOR [LastUpdateDate]
GO
/****** Object:  Default [DF_CategoryEntry_IsPrimary]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry] ADD  CONSTRAINT [DF_CategoryEntry_IsPrimary]  DEFAULT ((0)) FOR [IsPrimary]
GO
/****** Object:  Default [DF_CategoryEntry_IsVisible]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry] ADD  CONSTRAINT [DF_CategoryEntry_IsVisible]  DEFAULT ((0)) FOR [IsVisible]
GO
/****** Object:  Default [DF_CategoryEntry_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry] ADD  CONSTRAINT [DF_CategoryEntry_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_CategoryEntry_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry] ADD  CONSTRAINT [DF_CategoryEntry_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_CategoryEntry_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry] ADD  CONSTRAINT [DF_CategoryEntry_DateUpdated]  DEFAULT ('1-1-1753') FOR [DateUpdated]
GO
/****** Object:  Default [DF_myegp_Blogs_Comment_Title]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_myegp_Blogs_Comment_Title]  DEFAULT ('') FOR [Title]
GO
/****** Object:  Default [DF_Comment_Feedback]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_Feedback]  DEFAULT ('') FOR [Feedback]
GO
/****** Object:  Default [DF_myegp_Blogs_Comment_IsVisible]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_myegp_Blogs_Comment_IsVisible]  DEFAULT ((0)) FOR [IsVisible]
GO
/****** Object:  Default [DF_Comment_IsApproved]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_IsApproved]  DEFAULT ((0)) FOR [IsApproved]
GO
/****** Object:  Default [DF_Comment_CommenterName]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_CommenterName]  DEFAULT ('') FOR [CommenterName]
GO
/****** Object:  Default [DF_myegp_Blogs_Comment_CommenterEmail]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_myegp_Blogs_Comment_CommenterEmail]  DEFAULT ('') FOR [CommenterEmail]
GO
/****** Object:  Default [DF_Comment_CommenterUrl]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_CommenterUrl]  DEFAULT ('') FOR [CommenterUrl]
GO
/****** Object:  Default [DF_Comment_CommenterHostName]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_CommenterHostName]  DEFAULT ('') FOR [CommenterHostName]
GO
/****** Object:  Default [DF_myegp_Blogs_Comment_CommenterIPAddress]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_myegp_Blogs_Comment_CommenterIPAddress]  DEFAULT ('0.0.0.0') FOR [CommenterIPAddress]
GO
/****** Object:  Default [DF_Comment_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Comment_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_Comment_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment] ADD  CONSTRAINT [DF_Comment_DateUpdated]  DEFAULT ('1-1-1753') FOR [DateUpdated]
GO
/****** Object:  Default [DF_Entry_LinkName]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_LinkName]  DEFAULT ('') FOR [LinkName]
GO
/****** Object:  Default [DF_Entry_Title]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_Title]  DEFAULT ('') FOR [Title]
GO
/****** Object:  Default [DF_Entry_Excerpt]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_Excerpt]  DEFAULT ('') FOR [Excerpt]
GO
/****** Object:  Default [DF_Entry_Text]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_Text]  DEFAULT ('') FOR [Text]
GO
/****** Object:  Default [DF_Entry_EnableCommentNotification]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_EnableCommentNotification]  DEFAULT ((0)) FOR [EnableCommentNotification]
GO
/****** Object:  Default [DF_Entry_EnableExcerptSyndication]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_EnableExcerptSyndication]  DEFAULT ((0)) FOR [EnableExcerptSyndication]
GO
/****** Object:  Default [DF_Entry_AllowComment]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_AllowComment]  DEFAULT ((0)) FOR [AllowComment]
GO
/****** Object:  Default [DF_Entry_AllowPing]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_AllowPing]  DEFAULT ((0)) FOR [AllowPing]
GO
/****** Object:  Default [DF_Entry_AllowTrackback]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_AllowTrackback]  DEFAULT ((0)) FOR [AllowTrackback]
GO
/****** Object:  Default [DF_Entry_FlightStartDate]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_FlightStartDate]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [FlightStartDate]
GO
/****** Object:  Default [DF_Entry_FlightEndDate]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_FlightEndDate]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [FlightEndDate]
GO
/****** Object:  Default [DF_Entry_SyndicationDate]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_SyndicationDate]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [SyndicationDate]
GO
/****** Object:  Default [DF_Entry_Status]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_Status]  DEFAULT ('') FOR [Status]
GO
/****** Object:  Default [DF_Entry_CommentStatus]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_CommentStatus]  DEFAULT ('') FOR [CommentStatus]
GO
/****** Object:  Default [DF_Entry_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Entry_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_Entry_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry] ADD  CONSTRAINT [DF_Entry_DateUpdated]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [DateUpdated]
GO
/****** Object:  Default [DF_EntryTag_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[EntryTag] ADD  CONSTRAINT [DF_EntryTag_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_EntryTag_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[EntryTag] ADD  CONSTRAINT [DF_EntryTag_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_EntryTag_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[EntryTag] ADD  CONSTRAINT [DF_EntryTag_DateUpdated]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [DateUpdated]
GO
/****** Object:  Default [DF_Pingback_Url]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback] ADD  CONSTRAINT [DF_Pingback_Url]  DEFAULT ('') FOR [Url]
GO
/****** Object:  Default [DF_Pingback_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback] ADD  CONSTRAINT [DF_Pingback_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Pingback_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback] ADD  CONSTRAINT [DF_Pingback_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_Pingback_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback] ADD  CONSTRAINT [DF_Pingback_DateUpdated]  DEFAULT ('1-1-1753') FOR [DateUpdated]
GO
/****** Object:  Default [DF_Tag_Name]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Tag] ADD  CONSTRAINT [DF_Tag_Name]  DEFAULT ('') FOR [Name]
GO
/****** Object:  Default [DF_Tag_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Tag] ADD  CONSTRAINT [DF_Tag_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Tag_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Tag] ADD  CONSTRAINT [DF_Tag_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_Tag_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Tag] ADD  CONSTRAINT [DF_Tag_DateUpdated]  DEFAULT ('1/1/1753 12:00:00 AM') FOR [DateUpdated]
GO
/****** Object:  Default [DF_Trackback_Title]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_Title]  DEFAULT ('') FOR [Title]
GO
/****** Object:  Default [DF_Trackback_Description]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_Description]  DEFAULT ('') FOR [Description]
GO
/****** Object:  Default [DF_Trackback_Url]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_Url]  DEFAULT ('') FOR [Url]
GO
/****** Object:  Default [DF_Trackback_Rss]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_Rss]  DEFAULT ('') FOR [Rss]
GO
/****** Object:  Default [DF_Trackback_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Trackback_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO
/****** Object:  Default [DF_Trackback_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback] ADD  CONSTRAINT [DF_Trackback_DateUpdated]  DEFAULT ('1-1-1753') FOR [DateUpdated]
GO
/****** Object:  Default [DF_myegp_Blogs_UserBlog_IsCreatorOwner]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[UserBlog] ADD  CONSTRAINT [DF_myegp_Blogs_UserBlog_IsCreatorOwner]  DEFAULT ((0)) FOR [IsPrimary]
GO
/****** Object:  Default [DF_UserBlog_IsDeleted]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[UserBlog] ADD  CONSTRAINT [DF_UserBlog_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_UserBlog_DateCreated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[UserBlog] ADD  CONSTRAINT [DF_UserBlog_DateCreated]  DEFAULT (getdate()) FOR [CreationDate]
GO
/****** Object:  Default [DF_UserBlog_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[UserBlog] ADD  CONSTRAINT [DF_UserBlog_DateUpdated]  DEFAULT ('1-1-1753') FOR [LastUpdateDate]
GO
/****** Object:  Default [DF_Post_ParentID]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Forums].[Post] ADD  CONSTRAINT [DF_Post_ParentID]  DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [ParentID]
GO
/****** Object:  Default [DF_Newsletter_DateSent]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Newsletters].[Newsletter] ADD  CONSTRAINT [DF_Newsletter_DateSent]  DEFAULT (getdate()) FOR [DateSent]
GO
/****** Object:  Default [DF_Newsletter_UpdatedBy]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Newsletters].[Newsletter] ADD  CONSTRAINT [DF_Newsletter_UpdatedBy]  DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [UpdatedBy]
GO
/****** Object:  Default [DF_Question_IsDefault]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Question] ADD  CONSTRAINT [DF_Question_IsDefault]  DEFAULT ((0)) FOR [IsDefault]
GO
/****** Object:  Default [DF_Question_IsArchived]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Question] ADD  CONSTRAINT [DF_Question_IsArchived]  DEFAULT ((0)) FOR [IsArchived]
GO
/****** Object:  Default [DF_Question_UpdatedBy]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Question] ADD  CONSTRAINT [DF_Question_UpdatedBy]  DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [UpdatedBy]
GO
/****** Object:  Default [DF_Question_DateUpdated]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Question] ADD  CONSTRAINT [DF_Question_DateUpdated]  DEFAULT (getdate()) FOR [DateUpdated]
GO
/****** Object:  ForeignKey [FK_Article_Category]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Articles].[Article]  WITH CHECK ADD  CONSTRAINT [FK_Article_Category] FOREIGN KEY([CategoryID])
REFERENCES [Articles].[Category] ([ID])
GO
ALTER TABLE [Articles].[Article] CHECK CONSTRAINT [FK_Article_Category]
GO
/****** Object:  ForeignKey [FK_Comment_Article]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Articles].[Comment]  WITH CHECK ADD  CONSTRAINT [FK_Comment_Article] FOREIGN KEY([ArticleID])
REFERENCES [Articles].[Article] ([ID])
GO
ALTER TABLE [Articles].[Comment] CHECK CONSTRAINT [FK_Comment_Article]
GO
/****** Object:  ForeignKey [FK_BannedIPAddress_Blog]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[BannedIPAddress]  WITH CHECK ADD  CONSTRAINT [FK_BannedIPAddress_Blog] FOREIGN KEY([BlogID])
REFERENCES [Blogs].[Blog] ([ID])
GO
ALTER TABLE [Blogs].[BannedIPAddress] CHECK CONSTRAINT [FK_BannedIPAddress_Blog]
GO
/****** Object:  ForeignKey [FK_CategoryEntry_Category]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry]  WITH CHECK ADD  CONSTRAINT [FK_CategoryEntry_Category] FOREIGN KEY([CategoryID])
REFERENCES [Blogs].[Category] ([ID])
GO
ALTER TABLE [Blogs].[CategoryEntry] CHECK CONSTRAINT [FK_CategoryEntry_Category]
GO
/****** Object:  ForeignKey [FK_CategoryEntry_Entry]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[CategoryEntry]  WITH CHECK ADD  CONSTRAINT [FK_CategoryEntry_Entry] FOREIGN KEY([EntryID])
REFERENCES [Blogs].[Entry] ([ID])
GO
ALTER TABLE [Blogs].[CategoryEntry] CHECK CONSTRAINT [FK_CategoryEntry_Entry]
GO
/****** Object:  ForeignKey [FK_Comment_Entry]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Comment]  WITH CHECK ADD  CONSTRAINT [FK_Comment_Entry] FOREIGN KEY([EntryID])
REFERENCES [Blogs].[Entry] ([ID])
GO
ALTER TABLE [Blogs].[Comment] CHECK CONSTRAINT [FK_Comment_Entry]
GO
/****** Object:  ForeignKey [FK_Entry_Blog]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Entry]  WITH CHECK ADD  CONSTRAINT [FK_Entry_Blog] FOREIGN KEY([BlogID])
REFERENCES [Blogs].[Blog] ([ID])
GO
ALTER TABLE [Blogs].[Entry] CHECK CONSTRAINT [FK_Entry_Blog]
GO
/****** Object:  ForeignKey [FK_EntryTag_Blog]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[EntryTag]  WITH CHECK ADD  CONSTRAINT [FK_EntryTag_Blog] FOREIGN KEY([BlogID])
REFERENCES [Blogs].[Blog] ([ID])
GO
ALTER TABLE [Blogs].[EntryTag] CHECK CONSTRAINT [FK_EntryTag_Blog]
GO
/****** Object:  ForeignKey [FK_EntryTag_Entry]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[EntryTag]  WITH CHECK ADD  CONSTRAINT [FK_EntryTag_Entry] FOREIGN KEY([EntryID])
REFERENCES [Blogs].[Entry] ([ID])
GO
ALTER TABLE [Blogs].[EntryTag] CHECK CONSTRAINT [FK_EntryTag_Entry]
GO
/****** Object:  ForeignKey [FK_EntryTag_Tag]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[EntryTag]  WITH CHECK ADD  CONSTRAINT [FK_EntryTag_Tag] FOREIGN KEY([TagID])
REFERENCES [Blogs].[Tag] ([ID])
GO
ALTER TABLE [Blogs].[EntryTag] CHECK CONSTRAINT [FK_EntryTag_Tag]
GO
/****** Object:  ForeignKey [FK_Pingback_Blog]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback]  WITH CHECK ADD  CONSTRAINT [FK_Pingback_Blog] FOREIGN KEY([BlogID])
REFERENCES [Blogs].[Blog] ([ID])
GO
ALTER TABLE [Blogs].[Pingback] CHECK CONSTRAINT [FK_Pingback_Blog]
GO
/****** Object:  ForeignKey [FK_Pingback_Category]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback]  WITH CHECK ADD  CONSTRAINT [FK_Pingback_Category] FOREIGN KEY([CategoryID])
REFERENCES [Blogs].[Category] ([ID])
GO
ALTER TABLE [Blogs].[Pingback] CHECK CONSTRAINT [FK_Pingback_Category]
GO
/****** Object:  ForeignKey [FK_Pingback_Entry]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Pingback]  WITH CHECK ADD  CONSTRAINT [FK_Pingback_Entry] FOREIGN KEY([EntryID])
REFERENCES [Blogs].[Entry] ([ID])
GO
ALTER TABLE [Blogs].[Pingback] CHECK CONSTRAINT [FK_Pingback_Entry]
GO
/****** Object:  ForeignKey [FK_Trackback_Blog]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback]  WITH CHECK ADD  CONSTRAINT [FK_Trackback_Blog] FOREIGN KEY([BlogID])
REFERENCES [Blogs].[Blog] ([ID])
GO
ALTER TABLE [Blogs].[Trackback] CHECK CONSTRAINT [FK_Trackback_Blog]
GO
/****** Object:  ForeignKey [FK_Trackback_Category]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback]  WITH CHECK ADD  CONSTRAINT [FK_Trackback_Category] FOREIGN KEY([CategoryID])
REFERENCES [Blogs].[Category] ([ID])
GO
ALTER TABLE [Blogs].[Trackback] CHECK CONSTRAINT [FK_Trackback_Category]
GO
/****** Object:  ForeignKey [FK_Trackback_Entry]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[Trackback]  WITH CHECK ADD  CONSTRAINT [FK_Trackback_Entry] FOREIGN KEY([EntryID])
REFERENCES [Blogs].[Entry] ([ID])
GO
ALTER TABLE [Blogs].[Trackback] CHECK CONSTRAINT [FK_Trackback_Entry]
GO
/****** Object:  ForeignKey [FK_UserBlog_Blog]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Blogs].[UserBlog]  WITH CHECK ADD  CONSTRAINT [FK_UserBlog_Blog] FOREIGN KEY([BlogID])
REFERENCES [Blogs].[Blog] ([ID])
GO
ALTER TABLE [Blogs].[UserBlog] CHECK CONSTRAINT [FK_UserBlog_Blog]
GO
/****** Object:  ForeignKey [FK_Post_Forum]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Forums].[Post]  WITH CHECK ADD  CONSTRAINT [FK_Post_Forum] FOREIGN KEY([ForumID])
REFERENCES [Forums].[Forum] ([ID])
GO
ALTER TABLE [Forums].[Post] CHECK CONSTRAINT [FK_Post_Forum]
GO
/****** Object:  ForeignKey [FK_Option_Question]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Option]  WITH CHECK ADD  CONSTRAINT [FK_Option_Question] FOREIGN KEY([QuestionID])
REFERENCES [Polls].[Question] ([ID])
GO
ALTER TABLE [Polls].[Option] CHECK CONSTRAINT [FK_Option_Question]
GO
/****** Object:  ForeignKey [FK_Vote_Option]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Vote]  WITH CHECK ADD  CONSTRAINT [FK_Vote_Option] FOREIGN KEY([OptionID])
REFERENCES [Polls].[Option] ([ID])
GO
ALTER TABLE [Polls].[Vote] CHECK CONSTRAINT [FK_Vote_Option]
GO
/****** Object:  ForeignKey [FK_Vote_Question]    Script Date: 06/19/2009 11:42:33 ******/
ALTER TABLE [Polls].[Vote]  WITH CHECK ADD  CONSTRAINT [FK_Vote_Question] FOREIGN KEY([QuestionID])
REFERENCES [Polls].[Question] ([ID])
GO
ALTER TABLE [Polls].[Vote] CHECK CONSTRAINT [FK_Vote_Question]
GO
